package com.smartfactory.sail.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import com.smartfactory.sail.entity.enums.OperLogResultEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author 王巨壁
 * @since 2019-08-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "OperLog对象", description = "")
public class OperLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "日志内容")
    private String content;

    @ApiModelProperty(value = "操作结果 0 成功 1 失败")
    private OperLogResultEnum result;

    @ApiModelProperty(value = "日志等级 0 普通 1 重要")
    private Integer level;

    @ApiModelProperty(value = "日志类型")
    private String type;

    @ApiModelProperty(value = "来源ip")
    private String ip;

    @ApiModelProperty(value = "操作人")
    @TableField("operUser")
    private String operUser;

    @ApiModelProperty(value = "操作时间")
    @TableField("operTime")
    private LocalDateTime operTime;


}
